1. Field of the Invention
The present invention relates to a method, system, and article of manufacture for using different groups of query graph transform modules to generate execution plans for queries for different database types.
2. Description of the Related Art
Database queries may be provided for different types of database, such as the querying of objects in an object oriented database or the querying of rows in a relational database table. A query of a relational database may be expressed in the Structured Query Language (SQL) and a query of an object in an object oriented database may be expressed in an object oriented query language such as the Enterprise JavaBeans Query Language™ (“EJB QL”). (Enterprise JavaBeans Query Language is a trademark of Sun Microsystems, Inc. in the United States and other countries).
Further, a common abstract query language may be used to query different data systems. The abstract query language is not dependent on the specific data system and a user can write a query in this abstract query language without knowing the specific backend data system that will be used to execute the query (relational, object, etc) and the specific query language of the backend system. In addition, queries and programs written in the abstract query language may be ported from one data system to another. EJB QL is an example of such an abstract query language. The query written in EJB QL has to be changed into a query that can be executed by the specific data system. In the case of a relational database the EJB QL query must be translated to SQL. In the case of an object oriented database, the EJB QL query may be executed by iterating through collections of data objects and performing the query operations.
To execute a query, a query optimizer may parse the query and generate an optimized execution or access plan specifying the operations to perform to implement the received query with respect to the objects in memory for an object oriented database or relational database tables. Different query optimizers are used depending on the type of the target database subject to the query.
There is a need in the art for improved techniques for generating execution plans for queries in a heterogeneous data store environment.